package com.java.test;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.endpoint.Client;  
import com.java.entity.User;  
import com.java.service.IUserService;  
  
public class MainClient3 {  
 
    public static void main(String[] args) throws Exception {  
        // 调用WebService  
        JaxWsDynamicClientFactory  ser = JaxWsDynamicClientFactory.newInstance();  
        Client client =ser.createClient("http://localhost:8080/SpringCxfServer/user?wsdl");  
        Object[] o = client.invoke("sayHi", "sa");  
        System.out.println(o[0]);  
    }  
}  
